package com.example.sls.service.impl.social;

import com.example.sls.pojo.social.Posts;
import com.example.sls.dao.social.PostsDao;
import com.example.sls.service.intserfaces.social.PostsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 动态表(Posts)表服务实现类
 *
 * @author 蓝江富
 * @since 2024-06-18 10:55:11
 */
@Service
public class PostsServiceImpl implements PostsService {
  @Autowired
  PostsDao postsDao;

  @Override
  public Posts queryById(Integer id) {
    return postsDao.queryById(id);
  }

  @Override
  public int deleteById(Integer id) {
    return postsDao.deleteById(id);
  }

  @Override
  public int update(Posts posts) {
    return postsDao.update(posts);
  }

  @Override
  public int insert(Posts posts) {
    return postsDao.insert(posts);
  }

  @Override
  public long count() {
    return postsDao.count();
  }

  @Override
  public List<Posts> queryAllByLimit(Posts posts, Integer pageSize, Integer offset) {
    return postsDao.queryAllByLimit(posts, pageSize, offset);
  }
}
